import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
        {
          path: '/',
          redirect:'/dashboard'
        },
        {
           path:'/login',
           component:() => import('@/views/Login.vue')
        },
        {
          path:'/dashboard',
          component:() => import('@/views/Dashboard.vue'),
          children:[
            {
              path:'welcome',
              component: () =>import('@/views/dashboard/Welcome.vue')
            },
            {
              path:'user',
              component: () =>import('@/views/dashboard/User.vue'),
              
            },
          ]
       },

    
  ] 
})

export default router
